package va.radiomaria.audio;

import org.farng.mp3.MP3File;
import org.farng.mp3.id3.AbstractID3v2;

public class ID3v2Reader implements ID3Reader {
	private AbstractID3v2 tag;

	public ID3v2Reader(MP3File file) {
    	this.tag = file.getID3v2Tag();
	}
	
	@Override
	public String getAlbumTitle() {
		return tag.getAlbumTitle();
	}

	@Override
	public String getArtist() {
		return tag.getLeadArtist();
	}

	@Override
	public String getSongTitle() {
		return tag.getSongTitle();
	}

	/**
	 * Looks up the genre identifier number in the list of all genres.
	 */
	public String getGenre() {
		return tag.getSongGenre();
	}
}
